package com.xw.echo.core.nacos.client;
import com.xw.echo.core.register.HostAndPort;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;


public class AddrsLocalCache {
    private static Map<String, List<HostAndPort>> addrsMap = new ConcurrentHashMap<>();

    public static void add(String serviceName, List<HostAndPort> addrs) {
        addrsMap.put(serviceName, addrs);
    }
    public static List<HostAndPort> get(String serviceName) {
        return addrsMap.get(serviceName);
    }

    public static void remove(String serviceName) {
        addrsMap.remove(serviceName);
    }

}
